#include <stdio.h>
#include <unistd.h>
#include <fcntl.h>
#include <stdlib.h>

int main(){

	int fd;
	char c;
	fd=open("foobar.txt",O_RDONLY);
	if(fork()==0){
		read(fd,&c,1);
		exit(0);
	}
	wait(NULL);
	read(fd,&c,1);
	printf("c=%c\n",c);
	return 0;
}
